Skip to content

Conversation

@mkannwischer
Copy link
Contributor

Altenative to #807 (re-using chknorm instead of re-implementing a norm check, omitting tests for now).

This commit adds validation of the s1 and s2 components of the secret key to the pk_from_sk function. It checks if coefficients are within the valid bound [-MLDSA_ETA, MLDSA_ETA] by using the chknorm function that is already present in the code.

Documentation and CBMC proofs are adjusted accordingly.

@mkannwischer mkannwischer changed the title pk_from_sk: Add validation of s1 and s2 pk_from_sk: Add validation of s1 and s2 Jan 5, 2026
@mkannwischer mkannwischer force-pushed the validate-sk branch 2 times, most recently from 81d158f to a8738b1 Compare January 5, 2026 05:51
Copy link
Contributor

@hanno-becker hanno-becker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, only one nit regarding variable naming

Altenative to #807

This commit adds validation of the s1 and s2 components of the secret key
to the pk_from_sk function. It checks if coefficients are within the valid
bound [-MLDSA_ETA, MLDSA_ETA] by using the chknorm function that is
already present in the code.

Documentation and CBMC proofs are adjusted accordingly.

Signed-off-by: Matthias J. Kannwischer <[email protected]>
@mkannwischer mkannwischer marked this pull request as ready for review January 6, 2026 01:51
@mkannwischer mkannwischer requested a review from a team as a code owner January 6, 2026 01:51
@mkannwischer mkannwischer merged commit fd8be9c into main Jan 6, 2026
333 checks passed
@mkannwischer mkannwischer deleted the validate-sk branch January 6, 2026 02:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants